package org.idea.qiyu.framework.rocketmq.config.consumer;

import org.idea.qiyu.framework.rocketmq.properties.RocketMqConsumerProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * mq消费者自动配置类
 *
 * @Author linhao
 * @Date created in 6:42 下午 2021/7/2
 */
@Configuration
@EnableConfigurationProperties(RocketMqConsumerProperties.class)
public class MqConsumerAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public MqConsumerFactory mqConsumerFactory(){
        return new MqConsumerFactory();
    }
}
